package com.company.eduservice.feign;

import com.company.eduservice.feign.Impl.OrderServiceDegrade;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "service-order", fallback = OrderServiceDegrade.class)
@Component
public interface OrderFeignService {

    //根据用户ID和课程ID查询是否购买非免费课程
    @GetMapping("/eduorder/order/isBuyCourse/{courseId}/{memberId}")
    public boolean isBuyCourse(@PathVariable(required = false, name = "courseId") String courseId,
                               @PathVariable(required = false, name = "memberId") String memberId);

}
